// 以后所有的路由信息都添加到routes这个Array中
// 注意：路由中是component  没有s
export const routes = [{
		path: "/login",
		name: "login",
		component: () => import("@/views/login/Login.vue"),
	},
	{
		path: '/regist',
		name: "regist",
		component: () => import("@/views/regist/regist.vue")
	},
	{
		// 没有访问权限
		path: '/403',
		name: "url403",
		component: () => import("@/views/403.vue")
	},
	{
		// 未找到网页
		path: '/404',
		name: "url404",
		component: () => import("@/views/404.vue")
	},
	{
		// 通过正则来使未知路径跳转到404
		path: '/:pathMatch(.*)',
		redirect: "/404",

	},
	{
		path: "/Todo",
		name: "Todo",
		component: () => import("@/views/todo/todo.vue"),
	},
	{
		// 公共的路径前缀
		path: "/",
		name: "dashborad",
		//公共组件：记得在TabBar.vue中的<template>加上<router-view></router-view>
		// 			进而来调用TabBar中的内容
		component: () => import("_c/TabBar/TabBar.vue"),
		children: [{
				path: "/",
				// 直接跳转到home
				redirect: "/home",

			},
			{
				path: 'home',
				name: "home",
				component: () => import("@/views/home/Home.vue")
			},
			{
				path: 'about',
				name: "about",
				component: () => import("@/views/about/About.vue")
			},
			{
				path: 'usercenter',
				name: "usercenter",
				component: () => import("@/views/account/UserCenter.vue")
			},

		]
	},

	{
		path: "/uc/",
		name: "uc",
		component: () => import("_c/header/UcHeader.vue"),
		children: [{
				path: '',
				name: 'uc_home',
				redirect: '/uc/profile'
			},
			{
				path: "profile",
				name: "profile",
				meta:{
					title:"个人资料"
				},
				component: () => import("_v/account/Profile.vue"),

			},
			{
				path: "changename",
				name: "changename",
				meta:{
					title:"修改昵称"
				},
				component: () => import("_v/account/ChangeUsername.vue"),
			
			},
		]
	},


]
